import 'package:flutter/material.dart';
import 'package:jasmine/basic/platform.dart';
import 'package:jasmine/configs/Authentication.dart';
import 'package:jasmine/configs/android_display_mode.dart';
import 'package:jasmine/configs/android_version.dart';
import 'package:jasmine/configs/app_font_size.dart';
import 'package:jasmine/configs/app_orientation.dart';
import 'package:jasmine/configs/display_jmcode.dart';
import 'package:jasmine/configs/download_thread_count.dart';
import 'package:jasmine/configs/no_animation.dart';
import 'package:jasmine/configs/pager_column_number.dart';
import 'package:jasmine/configs/pager_cover_rate.dart';
import 'package:jasmine/configs/passed.dart';
import 'package:jasmine/configs/proxy.dart';
import 'package:jasmine/configs/search_title_words.dart';
import 'package:jasmine/configs/theme.dart';
import 'package:jasmine/configs/two_page_direction.dart';
import 'package:jasmine/configs/using_right_click_pop.dart';
import 'package:jasmine/configs/volume_key_control.dart';
import 'package:jasmine/configs/web_dav_password.dart';
import 'package:jasmine/configs/web_dav_sync_switch.dart';
import 'package:jasmine/configs/web_dav_url.dart';
import 'package:jasmine/configs/web_dav_username.dart';

import 'auto_clean.dart';
import 'categories_sort.dart';
import 'download_and_export_to.dart';
import 'export_path.dart';
import 'export_rename.dart';
import 'ignore_upgrade_pop.dart';
import 'ignore_view_log.dart';
import 'is_pro.dart';
import 'network_api_host.dart';
import 'network_cdn_host.dart';
import 'reader_controller_type.dart';
import 'reader_direction.dart';
import 'reader_slider_position.dart';
import 'reader_type.dart';
import 'versions.dart';
import 'login.dart';
import 'pager_controller_mode.dart';
import 'pager_view_mode.dart';

Future initConfigs(BuildContext context) async {
  await initPassed();
  await initAndroidVersion();
  await initAndroidDisplayMode();
  await initVersion();
  await initApiHost();
  await initCdnHost();
  await initPagerControllerMode();
  await initPagerViewMode();
  await initReaderType();
  await initTwoPageDirection();
  await initReaderDirection();
  await initReaderControllerType();
  await initReaderSliderPosition();
  await initPagerColumnCount();
  await initPagerCoverRate();
  await initAutoClean();
  await initTheme();
  await reloadIsPro();
  await initExportPath();
  await initDownloadThreadCount();
  await initProxy();
  await initUsingRightClickPop();
  await initWebDavSyncSwitch();
  await initWebDavUrl();
  await initWebDavUserName();
  await initWebDavPassword();
  await initVolumeKeyControl();
  await initNoAnimation();
  await initDownloadAndExportTo();
  await initExportRename();
  await initLogin(context);
  await initDisplayJmcode();
  await initSearchTitleWords();
  await initCategoriesSort();
  await initAuthentication();
  await initFontSizeAdjust();
  await initAppOrientation();
  await initIgnoreVewLog();
  await initIgnoreUpgradePop();
  if (normalPlatform) autoCheckNewVersion();
}
